package cn.springcloud.fix.gateway.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 网关路由表
 * </p>
 *
 * @author yangjun
 * @since 2020-01-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class GatewayRoute implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 物理主键，自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 路由id
     */
    private String routeId;

    /**
     * 路由名称
     */
    private String routeName;

    /**
     * 转发uri
     */
    private String routeUri;

    /**
     * 断言字符串集合，字符串结构：[{
     * "name":"Path",
     * "args":{
     * "pattern" : "/zy/**"
     * }
     * }]
     */
    private String predicates;

    /**
     * 过滤器字符串集合，字符串结构：{
     * "name":"StripPrefix",
     * "args":{
     * "_genkey_0":"1"
     * }
     * }
     */
    private String filters;

    /**
     * 路由加载顺序
     */
    private Integer routeOrder;

    /**
     * 状态，1：启用，0：不启用
     */
    private Boolean status;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 最后修改时间
     */
    private LocalDateTime updateTime;
}
